package service.impl;

import dao.NoteBookDao;
import dao.impl.NoteBookDaoImpl;
import model.NoteBook;
import service.NoteBookService;

import java.util.List;

/**
 * @Description:
 * @Author one world
 * @Date 2020/9/23 0023 12:47
 */
public class NoteBookServiceImpl implements NoteBookService {
    NoteBookDao dao = new NoteBookDaoImpl();
    @Override
    public List<NoteBook> findAll() {
        return dao.findAll();
    }

    @Override
    public NoteBook findById(int id) {
        return dao.findByPK(id);
    }

    @Override
    public boolean add(NoteBook noteBook) {
        return dao.add(noteBook);
    }

    @Override
    public boolean del(int id) {
        return dao.delByPK(id);
    }

    @Override
    public boolean update(NoteBook noteBook) {
        return dao.update(noteBook);
    }
}
